package com.crazymaker.springcloud.demo.security;

import org.springframework.security.authentication.AbstractAuthenticationToken;

public class DemoToken extends AbstractAuthenticationToken {

    private String username;

    private String password;

    public DemoToken(String username, String password) {
        super(null);
        this.username = username;
        this.password = password;
    }

    @Override
    public Object getCredentials() {
        return password;
    }

    @Override
    public Object getPrincipal() {
        return username;
    }
}
